/*
 * Sesame Inc.
 * Copyright (c) 2009 All Rights Reserved.
 */
package com.sesame.daoimpl;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.sesame.dao.FindPasswordDAO;
import com.sesame.domain.FindPassword;

/**
 * @author r6c
 * 
 */
public class FindPasswordDAOImpl extends SqlMapClientDaoSupport implements
        FindPasswordDAO {

    public void addFindPassword(FindPassword findPassword) {
        getSqlMapClientTemplate().insert("addFindPassword", findPassword);
    }

    public void deleteFindPasswordByCode(String code) {
        getSqlMapClientTemplate().delete("deleteFindPasswordByCode", code);
    }

    @SuppressWarnings("unchecked")
    public List<FindPassword> getAllFindPassword() {
        return (List<FindPassword>) getSqlMapClientTemplate().queryForList(
                "getFindPasswordFindPassword");
    }

    public FindPassword getFindPasswordByCode(String code) {
        return (FindPassword) getSqlMapClientTemplate().queryForObject(
                "getFindPasswordByCode", code);
    }

}